package com.jsmile.cloud.authc.help.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.jsmile.cloud.authc.api.req.sys.ReqSysHelpUpdate;

import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 龚亮
 * @version 1.0
 * @desc 为了薪资破万，还是睡一会儿吧...!
 * @date 2020年10月19日 03:27:57
 */
@ApiModel
@Data
@TableName("t_op_sys_help")
public class SysHelp extends Model<SysHelp> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "文档编码（用于唯一标识）")
    private String helpCode;
    @ApiModelProperty(value = "文档标题")
    private String helpTitle;
    @ApiModelProperty(value = "文档内容")
    private String helpContent;
    @ApiModelProperty(value = "文档地址")
    private String helpUrl;
    @ApiModelProperty(value = "文档类型")
    private String helpType;
    @ApiModelProperty(value = "是否可用 1是 0否")
    private Integer enable;
    @ApiModelProperty(value = "创建者")
    private String createBy;
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    @ApiModelProperty(value = "更新者")
    private String updateBy;
    @ApiModelProperty(value = "更新时间")
    private java.util.Date updateTime;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "租户id")
    private Long tenantId;

    public static SysHelp create(ReqSysHelpUpdate reqSysHelpUpdate) {
        SysHelp sysHelp = BeanUtil.toBean(reqSysHelpUpdate, SysHelp.class);
        return sysHelp;
    }
}
